<?php
include "../librari/koneksi.php";

	
  $id=$_POST['id']; 
  $nama=$_POST['nama'];
  $passwd=$_POST['passwd'];


 if($id!="" && $nama!="" && $passwd!=""){
 $sql = "INSERT INTO hrd set idHRD='".$_POST['id']."', nmHRD='".$_POST['nama']."',
									passwdHRD='".$_POST['passwd']."'"
									;
								
mysql_query($sql)
or die ("Gagal query simpan: ".mysql_error());
}


 if($id =="" || $nama =="" || $passwd==""){
 echo "<script language='JavaScript'>document.location='hrd.php';
alert('Ada data yang belum diisi. Silahkan Ulangi Kembali.   --".$id."--".$nama."--".$passwd."  Klik OK!');
 </script>"; }
 
 echo "<script language='JavaScript'>document.location='hrd.php';
alert('Sukses. Klik OK!');
 </script>";
	
			
?>